home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 21 / AMIGAplus Sonderheft 21 (1999)(ICP)(DE)[!].iso / Magazin / Future-PD / HTML-Creator / Source / DOS < prev    next >
Text File  |  1999-08-23  |  4KB  |  155 lines

  1. x%=1:y%=1
  2. ver$="$VER: Part of HTML-Creator V1.23"
  3. DIM text0$(1),text1$(1),text2$(1),text3$(1),text4$(1),text5$(1),text6$(1)
  4. DIM text7$(1),text8$(1), text9$(1),text10$(1), text11$(1)
  5.  
  6. text0$(0)="Gefundene Fehler:"
  7. text0$(1)="Errors found:"
  8.  
  9. text1$(0)="================="
  10. text1$(1)="============="
  11.  
  12. text2$(0)="Die Erweiterung (*.ERW) ist länger als 3 Zeichen."
  13. text2$(1)="The Extension (*.EXT) is longer than 3 characters."
  14.  
  15. text3$(0)="Der Dateiname ist zu lang."
  16. text3$(1)="The file name is too long."
  17.  
  18. text4$(0)="Es ist nur 1 '.' erlaubt."
  19. text4$(1)="Only 1 '.' is allowed."
  20.  
  21. text5$(0)="Der '.' steht an der"
  22. text6$(0)=". Stelle. Er darf aber nur an der 2. bis 9. Stelle stehen."
  23.  
  24. text5$(1)="The '.' is at position number"
  25. text6$(1)=", but may be between position number 2 to 9, only."
  26.  
  27. text7$(0)="Es ist kein '"
  28. text8$(0)="' im Dateinamen erlaubt."
  29.  
  30. text7$(1)="A '"
  31. text8$(1)="' is not allowed in the file name."
  32.  
  33. text9$(0)="Gefundene Fehler wurden in der Datei 'ram:Errors.txt' abgespeichert."
  34. text9$(1)="Any errors found, have been stored in 'ram:Errors.txt'."
  35.  
  36. text10$(0)="Bitte drücken Sie"
  37. text10$(1)="Please press"
  38.  
  39. text11$(0)="Lese Zeile: "
  40. text11$(1)="Processing line: "
  41. ON ERROR GOTO fehler
  42. OPEN "I",#1,"DOS.info"
  43. WHILE NOT EOF(1)
  44. INPUT#1,x$
  45. daus%=INSTR(x%,x$,"(DEUTSCH)")
  46. 20 dein%=INSTR(x%,x$,"DEUTSCH")
  47. IF dein%=daus%+1 THEN x%=daus%+2:GOTO 20
  48. eaus%=INSTR(y%,x$,"(ENGLISH)")
  49. 40 eein%=INSTR(y%,x$,"ENGLISH")
  50. IF eein%=eaus%+1 THEN y%=eaus%+2:GOTO 40
  51. WEND
  52. CLOSE
  53. IF dein%>daus%+1 THEN lan%=0
  54. IF eein%>eaus%+1 OR (dein%=0 AND eein%=0) THEN lan%=1
  55. start:file&=0:errors&=0
  56. IF lan%=0 THEN
  57. INPUT "Pfad/Dateiname: ",filename$
  58. ELSE
  59. INPUT "Path/file name: ",filename$
  60. END IF
  61. OPEN "I",#1,filename$
  62. OPEN "O",#2,"ram:Errors.txt"
  63. PRINT#2,text0$(lan%)
  64. PRINT#2,text1$(lan%)+CHR$(13)+CHR$(10)+CHR$(10)
  65. LOCATE 3,1:PRINT text11$(lan%):leng%=LEN(text11$(lan%))
  66. WHILE NOT EOF(1)
  67. punkt%=0:file&=file&+1
  68. LINE INPUT#1,x$
  69. LOCATE 3,leng%:PRINT file&
  70. IF x$>"" THEN
  71.  IF MID$(x$,LEN(x$)-2,1)=":" THEN
  72.  FOR x%=1 TO 13
  73.  a$=MID$(x$,x%,1):IF a$="." THEN punkt%=punkt%+1
  74.  IF punkt%=1 AND x%<8 THEN
  75.  GOSUB createy
  76.  IF LEN(y$)-x%>3 THEN PRINT#2,y$+": "+text2$(lan%)+CHR$(10):errors&=errors&+1
  77.  END IF
  78.  IF x%=13 AND a$>CHR$(32) THEN
  79.  GOSUB createy0
  80.  PRINT#2,y$+": "+text3$(lan%)+CHR$(10)
  81.  END IF
  82.  IF punkt%=2 THEN
  83.  GOSUB createy0
  84.  PRINT#2,y$+": "+text4$(lan%)+CHR$(10):punkt%=-12
  85.  END IF
  86.  IF a$="." AND (x%=10 OR x%=11 OR x%=12) THEN
  87.  GOSUB createy0
  88.  PRINT#2,y$+": "+text5$(lan%)+STR$(x%)+text6$(lan%)+CHR$(10)
  89.  END IF
  90.  IF a$="?" THEN GOSUB founderr
  91.  IF a$="," THEN GOSUB founderr
  92.  IF a$=";" THEN GOSUB founderr
  93.  IF a$="=" THEN GOSUB founderr
  94.  IF a$="*" THEN GOSUB founderr
  95.  IF a$="\" THEN GOSUB founderr
  96.  IF a$="+" THEN GOSUB founderr
  97.  IF a$=CHR$(34) THEN GOSUB founderr
  98.  IF a$="<" THEN GOSUB founderr
  99.  IF a$=">" THEN GOSUB founderr
  100.  IF a$="[" THEN GOSUB founderr
  101.  IF a$="]" THEN GOSUB founderr
  102.  NEXT
  103.  END IF
  104. END IF
  105. WEND
  106. PRINT#2,text0$(lan%)+STR$(errors&)
  107. CLOSE:CLS:PRINT:PRINT text9$(lan%):PRINT:PRINT
  108. PRINT text10$(lan%)+" <RETURN>."
  109. 1 a$=INKEY$: IF a$="" THEN SLEEP
  110. IF a$<>CHR$(13) THEN GOTO 1
  111. SYSTEM
  112. founderr:
  113. GOSUB createy0
  114. PRINT#2,y$;": "+text7$(lan%)+a$+text8$(lan%)+CHR$(10)
  115. RETURN
  116. createy0:
  117. errors&=errors&+1
  118. createy:
  119. size%=0:posi%=1
  120. IF LEN(x$)>=29 THEN
  121. y$=LEFT$(x$,LEN(x$)-28)
  122. ELSE
  123. y$=x$
  124. END IF
  125. FOR a%=LEN(y$) TO 1 STEP -1
  126. posi%=a%
  127. b$=MID$(y$,a%,1)
  128. IF size%=0 AND b$=CHR$(32) THEN size%=1
  129. IF size%=1 AND b$<>CHR$(32) THEN a%=1:size%=-1
  130. NEXT
  131. IF size%=-1 THEN y$=LEFT$(y$,posi%)
  132. RETURN
  133. fehler:
  134. fehler%=ERR
  135. IF lan%=-1 AND fehler%=53 THEN lan%=1:RESUME start
  136. RESUME fehler2
  137. fehler2:
  138. IF lan%=0 THEN
  139.  IF fehler%<>53 THEN
  140.  PRINT "Es ist ein Fehler Nr. ";fehler%;" aufgetreten. Beende Programm.":PRINT "Bitte drücken Sie eine Taste."
  141.  ELSE
  142.  PRINT "Datei nicht gefunden."
  143.  END IF
  144. ELSE
  145.  IF fehler%<>53 THEN
  146.  PRINT "An error number ";fehler%;" occurred. Aborting.":PRINT "Please press any key."
  147.  ELSE
  148.  PRINT "File not found."
  149.  END IF
  150. END IF
  151. ende:
  152. a$=INKEY$:IF a$="" THEN SLEEP
  153. IF a$>"" THEN SYSTEM
  154. GOTO ende
  155.